Beta hardening: expose isDebug + write real Render deprecation#211
Merged
Conversation
Replaces the hardcoded `internal val isDebug = false` (with its
`// TODO NEED TO CONFIGURE THIS` placeholder) with a real config knob.
isDebug is now a parameter on the generated installNavigationController
and rememberNavigationController extensions, plumbed through
internalCreateEnroController to set the flag on the EnroController
before any module is added. Default is false to preserve existing
behaviour.
Apps wire it to BuildConfig.DEBUG (or the platform equivalent):
MyComponent.installNavigationController(this, isDebug = BuildConfig.DEBUG)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replaces the placeholder "TODO BETTER DEPRECATION MESSAGE" with a proper message + ReplaceWith pointing at NavigationDisplay(this) β which is what Render delegates to internally. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
73f3bef to
992a38b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two small beta-readiness items from the Tier-2 hardening list.
isDebugis now a parameter oninstallNavigationController(andrememberNavigationController). The hardcodedinternal val isDebug = falsewas a feature flag with no way to turn it on β the metadata-serializer validation it gates never ran in any real app. The processor now generatesinstallNavigationControllerwith anisDebug: Boolean = falseparameter that's plumbed throughinternalCreateEnroControllerto set the flag on the controller before any module is added.isDebugstaysinternal varonEnroControlleritself β it's not toggleable post-install β so the public API surface is just the install-time parameter.NavigationContainerState.Renderdeprecation now has a real message. The placeholder@Deprecated("TODO BETTER DEPRECATION MESSAGE")is replaced with proper text +ReplaceWith(NavigationDisplay(this))β which is whatRenderwas already delegating to internally.Why
Both items would be embarrassing in a beta:
isDebugwas a feature flag with no way to turn it on. The serializer validation it controls is meant to surface missing serializers loudly in debug builds, but as shipped it was permanently off.What's NOT in this PR
SyntheticDestinationScopecompleteness β the bigger Tier-2 item that needs to collect operations during the block and integrate with the result-channel system. Wants design discussion and a focused PR.enro-compatremoval plan β product decision, not code.TODO()calls inNavigationPathBindingTestsβ turned out to be a false alarm; they're intentional placeholders for deserialize/serialize lambdas that aren't exercised in tests that only checkmatches().Test plan
./gradlew :enro-runtime:desktopTestβ green, no regressions../gradlew :tests:application:compileKotlinDesktopβ test app compiles against the new generated install signature.tests/application/build/generated/ksp/desktop/.../TestApplicationComponentNavigation.ktβ confirminstallNavigationControllerandrememberNavigationControllerboth take and forwardisDebug.NavigationContainerState.Render()usage.π€ Generated with Claude Code